package com.aef.service;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

public class AuthService {

	public List<Record> getUser(String openid) {
		List<Record> list = Db.find(
				"select name,openid,userType from wechat_qy q,wechat_qy_user u where q.id = u.qyId and u.enable ='1' and u.openId=?",
				openid);
		return list;
	}
	
	public List<Record> getUserAll(String openid) {
		List<Record> list = Db.find(
				"select name,openid,contacts,phone from wechat_qy q,wechat_qy_user u where q.id = u.qyId and u.enable ='1' and u.openId=?",
				openid);
		return list;
	}

}
